package be.ac.ua.comp.projectGPT.Jobs.implementations;

//~--- non-JDK imports --------------------------------------------------------

import be.ac.ua.comp.projectGPT.Jobs.RunnableJob;

public class SleepingJob extends RunnableJob {
    
    int seconds = 0;

    public SleepingJob(int seconds) {
        this.seconds = seconds;
    }

    public void run() {
        try {
            logger.info("Starting");
            Thread.sleep(seconds);
            setChanged();
            notifyObservers("Success");
            logger.info("Ending");
        } catch (InterruptedException e) {
            logger.error("InterruptedException: " + e.getLocalizedMessage());
        }
    }
}
